import Vue from 'vue'
import Vuex from 'vuex'
import cart from './cart'
import user from './user'
import order from './order'
Vue.use(Vuex)
export default new Vuex.Store({
  getters: {
    token:state=>state.user.token.token,
    tokenHead:state=>state.user.token.tokenHead,
    username:state=>state.user.userInfo.username,
    memberLevelId:state=>state.user.userInfo.memberLevelId,
    memberId:state=>state.user.userInfo.id,
  },
  mutations: {},
  actions: {},
  modules: { 
    cart,user,order
  }
})